package com.yl.enums;

/*枚举类  将我们所有可能出现的结果一一列举出来 使用时直接取出*/
/*枚举类 有多少值 就有多少属性*/
/*必须有构造器*/
public enum ResultEnum {
    ERROR(9999, "操作失败"),
    SUCCESS(10000, "操作成功"),
    NO_LOGIN(10001, "未登录"),
    ARGS_FAILED(10002, "参数不正确"),
    ARGS_ISNULL(10003, "参数不能为空"),
    USER_NOT_EXIST(10004, "账号不存在"),
    USER_HAVE_EXIST(10004, "账号已存在"),
    PASSWORD_ERROR(10005, "密码错误"),
    LOGIN_NAME_EXIST(10006, "账号已存在"),
    ACCOUNT_EXCEPTION(10007, "账号异常"),
    PHONE_FORMAT_ERROR(10008, "手机号格式错误"),
    SECURITY_CODE_ERROR(10009, "验证码错误"),
    ADD_SUCCESS(10010, "增加成功"),
    ADD_ERROR(10011, "增加失败"),
    UPDATE_SUCCESS(10012, "修改成功"),
    UPDATE_ERROR(10013, "修改失败"),
    DELETE_SUCCESS(10014, "删除成功"),
    DELETE_ERROR(10015, "删除失败"),
    LOGIN_SUCCESS(10016, "登录成功"),
    REGISTER_SUCCESS(10017, "注册成功"),
    REGISTER_ERROR(10018, "注册失败"),
    COLLECTION_SUCCESS(10019, "收藏成功"),
    SHENHE_SUCCESS(10020, "审核成功"),
    SHENHE_ERROR(100121, "审核失败"),
    INVALID_TOKEN (100122,"无效的token"),
    TOO_MANY_REQUEST(100123,"请求过多,请稍后再试"),
    FALLBACK(100124,"触发降级");



    private Integer states;
    private String statesInfo;


    ResultEnum(Integer states, String statesInfo) {
        this.states = states;
        this.statesInfo = statesInfo;
    }

    public Integer getStates() {
        return states;
    }

    public void setStates(Integer states) {
        this.states = states;
    }

    public String getStatesInfo() {
        return statesInfo;
    }

    public void setStatesInfo(String statesInfo) {
        this.statesInfo = statesInfo;
    }

}
